#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(this,&Widget::MySignals,this,&Widget::MySlots);
    EmitSignals();
}

Widget::~Widget()
{
    delete ui;
}

void Widget::EmitSignals()
{
    emit MySignals();
}

void Widget::MySlots()
{
    this->setWindowTitle(QString("更改窗口名称。"));
}
